package com.yiwei.zhh.impl;

import android.content.Context;

import com.yiwei.zhh.constant.Const;
import com.yiwei.zhh.http.CallBackListener;
import com.yiwei.zhh.http.InterfaceServer;
import com.yiwei.zhh.interfaces.DealDetailInfo;
import com.yiwei.zhh.http.InfoCallBack;
import com.yiwei.zhh.model.DealDetailModel;
import com.yiwei.zhh.model.RequestModel;

import java.util.HashMap;

/**
 * 交易明细
 */
public class DealDetailInfoImpl
        implements DealDetailInfo {
    public void getDealDetailInfo(Context paramContext, String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, final InfoCallBack callBack) {
        HashMap map = new HashMap();
        map.put("page", paramString4);
        map.put("pagesize", paramString5);
        RequestModel model = new RequestModel(map);
        InterfaceServer.getInstance(paramContext.getApplicationContext()).requestInterface(Const.MONEY_LOG, Const.RequestMethod.POST, model, Const.DEFAULT_TIMEOUT,new CallBackListener<DealDetailModel>(DealDetailModel.class,callBack));
//                new ResponseListener() {
//            public void onFinishInMainThread(Object paramAnonymousObject) {
//            }
//
//            public void onStartInMainThread(Object paramAnonymousObject) {
//                callBack.onFailure(paramAnonymousObject.toString());
//            }
//
//            @Override
//            public void onSuccessInMainThread(int paramAnonymousInt, String paramAnonymousString, Object result) {
//                try {
//                    DealDetailModel model = (DealDetailModel) result;
//                    if (model.getStatus() == 1)
//                        callBack.onSuccess(model);
//                    else callBack.onFailure(model.getMsg());
//                    //返回数据接口
//                } catch (Exception e) {
//                    e.printStackTrace();
//                }
//            }
//
//            @Override
//            public Object onSuccessInRequestThread(int statusCode, String content) {
//                try {
//                    return JsonUtil.<DealDetailModel>fromJson(content, DealDetailModel.class);
//                } catch (Exception e) {
//                    return null;
//                }
//            }
//        });
    }
}
